
#--------------------------------------------------------------------------
#MAIN
if __name__ == "__main__":
    f = open('C:/_DATA/CancerData/test/Jan15/Thousand/AZM/run/1.bat','r')
    line = f.readline()

    a = ""
    while line:
        a += line
        line = f.readline()
    f.close()
    output = ''
    #print a[:111]+ str(1) + a[112:159]
    #+ str(1) + a[141:258] + str(1) + a[259:]

    #for i in range(0,20):
    #i = 1
    for i in range(0,20):
        output = ''
        for j in range(0,50):
        #temp = a[:140] + str(i) + a[141:258] + str(i) + a[259:]
            temp = a[:111]+ str(i*50+j) + a[112:159] + str(i*50+j) + a[160:]
            output += temp + '\n\n'
            filename = 'C:/temp/AZM/run_'+str(i)+'.bat'
            f = open(filename,'w')
            f.write(output)
            f.close()
    #filename = 'C:/_DATA/CancerData/test/Jan15/Thousand/AZM/run/shape_run.bat'
    #f = open(filename,'w')
    #f.write(output)
    #f.close()